// ----- dataGridView1_CellValidated () -------------------------------- String ^wpis=Convert::ToString(dataGridView1->CurrentCell->Value); if(wpis->Equals(String::Empty)) return; try { Convert::ToDouble(wpis);} catch( FormatException ^) { MessageBox::Show( "Musisz podać poprawną wartość liczbową", "Błąd", MessageBoxButtons::OK, MessageBoxIcon::Error); dataGridView1->CurrentCell->Value=L""; } // ----- button1_Click() --------------------------------------------- dataGridView1->RowCount=3; dataGridView1->DefaultCellStyle->BackColor=Color::White; dataGridView1->AlternatingRowsDefaultCellStyle->BackColor=Color::FromArgb(192,255,192); for( int w=0; wRowCount; w++) for( int k=0; kColumnCount; k++) dataGridView1->Rows[w]->Cells[k]->Value=10*w+k+0.7; // ----- Zmienne globalne --------------------------------------------- int Rozmiar=0; double TX[1000],TY[1000]; // ----- button2_Click() --------------------------------------------- Rozmiar=0; for( int i=0; iRowCount; i++) { String ^SX=Convert::ToString(dataGridView1->Rows[i]->Cells[0]->Value); String ^SY=Convert::ToString(dataGridView1->Rows[i]->Cells[1]->Value); if(SX->Equals(String::Empty)==false && SX->Equals(String::Empty)==false) { try { TX[ Rozmiar]=Convert::ToDouble(SX); TY[ Rozmiar]=Convert::ToDouble(SY); Rozmiar++; } catch(FormatException ^) { } } }